<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: PDFDocumentLoadingTask</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: PDFDocumentLoadingTask</h1>

    




<section>

<header>
    
        <h2><span class="attribs"><span class="type-signature"></span></span>
            <span class="ancestors"><a href="module-pdfjsLib.html">pdfjsLib</a>~</span>PDFDocumentLoadingTask<span class="signature">()</span><span class="type-signature"></span></h2>
        
            <div class="class-description">The loading task controls the operations required to load a PDF document
(such as network requests) and provides a way to listen for completion,
after which individual pages can be rendered.</div>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    
    <h2>Constructor</h2>
    

    
    <h4 class="name" id="PDFDocumentLoadingTask"><span class="type-signature"></span>new PDFDocumentLoadingTask<span class="signature">()</span><span class="type-signature"></span></h4>
    

    















<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">api.js</a>, <a href="api.js.html#line552">line 552</a>
    </li></ul></dd>
    

    

    

    
</dl>




















    
    </div>

    

    

    

    

    

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id="destroyed"><span class="type-signature"></span>destroyed<span class="type-signature"> :boolean</span></h4>




<div class="description">
    Whether the loading task is destroyed or not.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">boolean</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">api.js</a>, <a href="api.js.html#line570">line 570</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="docId"><span class="type-signature"></span>docId<span class="type-signature"> :string</span></h4>




<div class="description">
    Unique identifier for the document loading task.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">string</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">api.js</a>, <a href="api.js.html#line564">line 564</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="onPassword"><span class="type-signature"></span>onPassword<span class="type-signature"> :function</span></h4>




<div class="description">
    Callback to request a password if a wrong or no password was provided.
The callback receives two parameters: a function that should be called
with the new password, and a reason (see PasswordResponses).
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">function</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">api.js</a>, <a href="api.js.html#line578">line 578</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="onProgress"><span class="type-signature"></span>onProgress<span class="type-signature"> :function</span></h4>




<div class="description">
    Callback to be able to monitor the loading progress of the PDF file
(necessary to implement e.g. a loading bar).
The callback receives an OnProgressParameters argument.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">function</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">api.js</a>, <a href="api.js.html#line586">line 586</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="onUnsupportedFeature"><span class="type-signature"></span>onUnsupportedFeature<span class="type-signature"> :function</span></h4>




<div class="description">
    Callback for when an unsupported feature is used in the PDF document.
The callback receives an UNSUPPORTED_FEATURES argument.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">function</span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">api.js</a>, <a href="api.js.html#line593">line 593</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="promise"><span class="type-signature"></span>promise<span class="type-signature"> :Promise:<a href="module-pdfjsLib-PDFObjects.html"></a>.&lt;PDFDocumentProxy:<a href="module-pdfjsLib-PDFObjects.html"></a>></span></h4>




<div class="description">
    Promise for document loading task completion.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type">Promise:<a href="module-pdfjsLib-PDFObjects.html"></a>.&lt;PDFDocumentProxy:<a href="module-pdfjsLib-PDFObjects.html"></a>></span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">api.js</a>, <a href="api.js.html#line600">line 600</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    
    <h4 class="name" id="destroy"><span class="type-signature">(async) </span>destroy<span class="signature">()</span><span class="type-signature"> &rarr; {Promise:<a href="module-pdfjsLib-PDFObjects.html"></a>.&lt;void:<a href="module-pdfjsLib-PDFObjects.html"></a>>}</span></h4>
    

    



<div class="description">
    Abort all network requests and destroy the worker.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="api.js.html">api.js</a>, <a href="api.js.html#line609">line 609</a>
    </li></ul></dd>
    

    

    

    
</dl>















<h5>Returns:</h5>

        
<div class="param-desc">
    A promise that is resolved when destruction is
  completed.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Promise:<a href="module-pdfjsLib-PDFObjects.html"></a>.&lt;void:<a href="module-pdfjsLib-PDFObjects.html"></a>></span>


    </dd>
</dl>

    





        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-pdfjsLib.html">pdfjsLib</a></li></ul><h3>Classes</h3><ul><li><a href="module-pdfjsLib-PDFDataRangeTransport.html">PDFDataRangeTransport</a></li><li><a href="module-pdfjsLib-PDFDocumentLoadingTask.html">PDFDocumentLoadingTask</a></li><li><a href="module-pdfjsLib-PDFDocumentProxy.html">PDFDocumentProxy</a></li><li><a href="module-pdfjsLib-PDFObjects.html">PDFObjects</a></li><li><a href="module-pdfjsLib-PDFPageProxy.html">PDFPageProxy</a></li><li><a href="module-pdfjsLib-PDFWorker.html">PDFWorker</a></li><li><a href="module-pdfjsLib-RenderTask.html">RenderTask</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Sep 07 2022 09:51:15 GMT+0000 (Coordinated Universal Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>